package com.icss.lesson1;

public class TestMain3 {
    public static void main(String[] args) {

        int age = 10;
        changeage(age);
        System.out.println(age); // 10

        Student stu = new Student("tom", 10);
        changesno(stu);
        System.out.println(stu.getSno()); // 100

        stu.setSno(10);
        changeage(stu.getSno());
        System.out.println(stu.getSno()); // 10
    }

    private static void changesno(Student stu) {
        stu.setSno(100);
        stu = new Student("tom", 1000);
    }
    private static void changeage(int age) {
        age = 100;
    }
}
